﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Satates.WaterCupState;

namespace Operators.WaterCupOperators
{
    public class Empty1:iOperator
    {
        public int getOperatorNumber()
        {
            return 3;
        }
        public WaterCupState execute(WaterCupState s)
        {
            return new WaterCupState(0, s.getCapacity2());
        }
        public bool available(WaterCupState s)
        {
            if (s.getCapacity1() > 0)
                return true;
            else return false;
        }
        public override string ToString()
        {
            return "Empting first cup";
        }


        public Common.Template execute(Common.Template t)
        {
            WaterCupState s = (WaterCupState)t;
            return new WaterCupState(0, s.getCapacity2());
        }
        public object Clone()
        {
            return this.MemberwiseClone();
        }
        public bool available(Common.Template t)
        {
            WaterCupState s = (WaterCupState)t;
            if (s.getCapacity1() > 0)
                return true;
            else return false;
        }
    }
}
